﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="SearchAddress.aspx.cs" Inherits="MockPrjTeam2.Pages.Views.SearchAddress" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">     
    <table cellpadding="0" cellspacing="0" style="width: 100%">
  <tr>
      <td colspan="3" style="font-family: Arial, Helvetica, sans-serif; font-size: large; color: #639A18;
                font-weight: bold; width: 592px;">
                Search PostCode
      </td>      
  </tr>
  <tr>
    <td>
        PostCode:&nbsp&nbsp<asp:TextBox ID="txtPostCode" runat="server"></asp:TextBox>
    </td>
    <td>
        Street:&nbsp&nbsp<asp:TextBox ID="txtStreet" runat="server"></asp:TextBox>
    </td>
    <td>
        Town:&nbsp&nbsp<asp:TextBox ID="txtTown" runat="server"></asp:TextBox>
    </td>
  </tr>
  <tr>
    <td colspan="3">        
        <asp:Button ID="btSearch" runat="server" Text="Search Address" 
            onclick="btSearch_Click" />&nbsp&nbsp
        <asp:Button ID="btNone" runat="server" Text="None" onclick="btNone_Click" />&nbsp&nbsp
        <asp:Button ID="btClear" runat="server" Text="Clear" onclick="btClear_Click" />&nbsp&nbsp       
        <asp:Button ID="btCreate" runat="server" Text="Create" 
            onclick="btCreate_Click" />
    </td>    
  </tr>
  <tr>
    <td colspan="3">         
        <asp:GridView ID="GVSearchAddress" runat="server" AutoGenerateColumns="False" 
            AllowPaging="True"
            onpageindexchanging="GVSearchAddress_PageIndexChanging" 
            onrowcommand="GVSearchAddress_RowCommand" CellPadding="4" 
            ForeColor="#333333" GridLines="None" >
            
            <AlternatingRowStyle BackColor="White" />
            
            <Columns>     
                <asp:TemplateField HeaderText="Address" ControlStyle-ForeColor="Black">
                <ItemTemplate>
                   <asp:LinkButton ID="btupdate" runat="server" Text='<%#Eval("_Address") %>' CommandName="Update" CommandArgument='<%#Eval("AddressId") %>'></asp:LinkButton>                       
                </ItemTemplate>

                <ControlStyle ForeColor="Black"></ControlStyle>
                </asp:TemplateField>                                                       
                <asp:BoundField DataField = "PostCode" HeaderText="PostCode" />
                <asp:BoundField DataField = "_Town.TownName" HeaderText="Town" />
                <asp:BoundField DataField = "_County.CountyName" HeaderText="County" />
                <asp:BoundField DataField = "_Country.CountryName" HeaderText="Country" />
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>                      
    </td>
  </tr> 
  <tr>
    <td colspan="3">
    <asp:Label ID="lblMsg" runat="server"></asp:Label>
    </td>
  </tr>  
 </table>
</asp:Content>
